<html>
<head><meta charset="utf-8"><title>performance on generated code · t-compiler/performance · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/index.html">t-compiler/performance</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/performance.20on.20generated.20code.html">performance on generated code</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="218756697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/performance%20on%20generated%20code/near/218756697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/performance.20on.20generated.20code.html#218756697">(Dec 03 2020 at 21:25)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/79671">https://github.com/rust-lang/rust/issues/79671</a> might be of interest</p>



<a name="218757086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/performance%20on%20generated%20code/near/218757086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tm <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/performance.20on.20generated.20code.html#218757086">(Dec 03 2020 at 21:30)</a>:</h4>
<p>The memory usage is liveness analysis (it can be disabled by putting <code>#[automatically_derived]</code> on impl block. There is definitely a lot of room for improvement there, but there were also proposals for moving it from HIR to MIR.</p>



<a name="218757375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/performance%20on%20generated%20code/near/218757375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/performance.20on.20generated.20code.html#218757375">(Dec 03 2020 at 21:32)</a>:</h4>
<p>liveness analysis is used for optimizing dead code, right? Why is that in rustc instead of llvm?</p>



<a name="218757382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/performance%20on%20generated%20code/near/218757382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/performance.20on.20generated.20code.html#218757382">(Dec 03 2020 at 21:32)</a>:</h4>
<p>what does <code>automatically_derived</code> do?</p>



<a name="218757621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/performance%20on%20generated%20code/near/218757621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tm <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/performance.20on.20generated.20code.html#218757621">(Dec 03 2020 at 21:34)</a>:</h4>
<p>in this context is is just a lint to detect unused variables, dead assignments etc, <code>automatically_derived</code> disables the lint</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>